<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>赋值运算符</title>
</head>
<body>
    <script>
        //=运算符
        var num1 = 100;
        console.log(num1);//100
        
        var x = 10;
        var y = 20;
        //+=运算符  x+=y
        //相等于
        x = x + y;//30
        //-=运算符  x-=y
        //相等于
        x = x - y;//10
        //*=运算符  x*=y
        //相等于
        x = x * y;//200
        ///=运算符  x/=y
        //相等于
        x = x / y;//10
        //%=运算符  x%=y
        //相等于
        x = x % y;//10

        console.log(x+=y);
        console.log(x-=y);
        console.log(x*=y);
        console.log(x/=y);
        console.log(x%=y);

    </script>
</body>
</html>